#ifndef ALTMATH_CONSTANT
#define ALTMATH_CONSTANT

#include "expressiontreenode.h"

namespace AltMath {
     /*! Represents a constant number. */
     class Constant : public ExpressionTreeNode {
     public:
          /*! Constructor.
               @param value The value of the constant. */
          Constant(const Real& value){
               m_value = value;
          }

          /*! Evalutates the constant. */
          Result evaluate() const {
               return Result(m_value);
          }

          /*! The constant's value. */
          const Real& value() const {
               return m_value;
          }
          /*! Sets the constant's value.
               @param value The new value. */
          void setValue(const Real& value){
               m_value = value;
          }

     private:
          /*! The constant's value. */
          Real m_value;
     };
}

#endif
